<div id="cpnDiv">                  
                  <div class="coupons-wrapper">
                    <div class="row">
                      <div class="large-8 columns">
                        <h2>Top <a><?php echo $categoryArray[0]['parent_name'];?></a> <span class="alt">Coupons</span></h2>
                      </div>
                      <div class="large-4 columns">
                      </div>
                    </div>
                    
                    <ul class="rr items-landscape">
                    <?php if(isset($catCouponArray) && !empty($catCouponArray)){ foreach($catCouponArray as $coupons){?>
                      <li class="wrapper-3">
                        <div class="row">
                          <div class="large-4 small-12 columns">
                            <figure><a href="/coupon.php/<?php echo $coupons['coupon_id']; ?>/<?php echo $coupons['store_id']; ?>">
                              <img src="
                              <?php if($coupons['coupon_image']!=''){ echo $coupons['coupon_image'];}else{ echo $coupons['store_image'];}?>
                              " alt="<?php echo $coupons['store_name'];?> promo codes"></a>
                            </figure>
                          </div>
                          <div class="large-5 small-8 columns">
                            <div class="col-middle" id="sec">
                              <h2 class="alt"><a href="/coupon.php/<?php echo $coupons['coupon_id']; ?>/<?php echo $coupons['store_id']; ?>"><?php echo $coupons['coupon_name'];?></a></h2>
                                <?php echo $coupons['coupon_description'];?>
                            </div>
                          </div>
                          <div class="large-3 small-4 columns">
                            <div class="col-right">
                              <p class="value secondary"><?php if($coupons['coupon_off_in']=='Percentage'){ echo $coupons['coupon_off_by'].' %';}else{ echo 'Rs '.$coupons['coupon_off_by'];}?> off</p>
                              <h6><?php echo $coupons['diff'];?> days left</h6>
                              <a href="/coupon.php/<?php echo $coupons['coupon_id']; ?>/<?php echo $coupons['store_id']; ?>" class="input button red secondary responsive">Show Coupon</a>
                            </div>
                          </div>
                        </div>
                      </li>
                    <?php }}?>
                    
                    <?php if(isset($catOfferArray) && !empty($catOfferArray)){ foreach($catOfferArray as $offer){ ?>
                    <li class="wrapper-3">
                        <div class="row">
                          <div class="large-4 small-12 columns">
                            <figure><a href="/coupon.php/<?php echo $offer['coupon_id']; ?>/<?php echo $offer['store_id']; ?>">
                              <img src="
                              <?php if($offer['coupon_image']!=''){ echo $offer['coupon_image'];}else{ echo $offer['store_image'];}?>
                              " alt="<?php echo $offer['store_name'];?> offers"></a>
                            </figure>
                          </div>
                          <div class="large-5 small-8 columns">
                            <div class="col-middle" id="sec">
                              <h2 class="alt"><a href="/coupon.php/<?php echo $offer['coupon_id']; ?>/<?php echo $offer['store_id']; ?>"><?php echo $offer['coupon_name'];?></a></h2>
                                <?php echo $offer['coupon_description'];?>
                            </div>
                          </div>
                          <div class="large-3 small-4 columns">
                            <div class="col-right">
                              <p class="value secondary"><?php if($offer['coupon_off_in']=='Percentage'){ echo $offer['coupon_off_by'].' %';}else{ echo 'Rs '.$offer['coupon_off_by'];}?> off</p>
                              <h6><?php echo $offer['diff'];?> days left</h6>
                              <a href="/coupon.php/<?php echo $offer['coupon_id']; ?>/<?php echo $offer['store_id']; ?>" class="input button blue secondary responsive">Learn more</a>
                            </div>
                          </div>
                        </div>
                      </li>
                      <?php }}?>
                    </ul>
                  </div>
                  <?php $count =ceil(count($couponCount)/5);  
                  if(count($couponCount)>5){?>
                  <ul class="rr pagination">
                  <?php if(isset($cur)){ if($cur=='1'){?>
                    <li><a style="background: #f0f0f0;color: #bebebe;">Previous</a></li>
                   <?php }else{?>
                   <li><a href="javascript:void(0);" onclick="moreCatCpn(<?php if(isset($prev)){ echo $prev;}?>, '<?php echo $categoryArray[0]['parent_url'];?>');">Previous</a></li>
                   <?php } for($i=0;$i<$count;$i++){?>
                    <li class="<?php if($cur==$i+1){ echo 'current';}?>"><a href="javascript:void(0);" onclick="moreCatCpn(<?php echo $i;?>, '<?php echo $categoryArray[0]['parent_url'];?>');" ><?php echo $i+1;?></a></li>
                   <?php }}?>
                    <?php if($cur==$count){?>
                    <li><a style="background: #f0f0f0;color: #bebebe;">Next</a></li>
                    <?php }else{?>
                    <li><a href="javascript:void(0);" onclick="moreCatCpn(<?php if(isset($next)){ echo $next;}?>, '<?php echo $categoryArray[0]['parent_url'];?>');">Next</a></li>
                    <?php }?>
                  </ul>
                  <?php }?>
                  </div>